package com.zsrt.day20170504.pm.synchronizedtest.consumerproducer1;
/**
*@author jzh
*@创建时间 2017年5月4日下午7:37:16
*类说明：
*/
public class Producer implements Runnable{
	
	SyncStack ss=new SyncStack();
	
	
	public Producer(SyncStack ss) {
		this.ss = ss;
	}


	@Override
	public void run() {
		for(int i=0;i<10;i++){
			MT mt = new MT(i);
			ss.push(mt);
			System.out.println("生产了"+mt);
			try {
				Thread.sleep(1000);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
	}
	
	

}
